<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center rcwtzg_flex_0_higd"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub rcwtzg_fd0_0_higd'>
					<view class='flex flex-wrap align-center rcwtzg_fd0_0_c0_higd' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  rcwtzg_fd0_0_c0_c0_higd'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='rcwtzg_fd0_0_c1_c0_higd'>{{title}}</text>
					</view>
					<view class='flex flex-wrap align-center justify-end rcwtzg_fd0_0_c0_higd'>
						<!-- <text class='rcwtzg_fd0_0_c2_c0_higd'  >{{$t('详情')}}</text>
 -->
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout rcwtzg_flex_1_higd">
				<view class='flex flex-wrap align-center rcwtzg_fd1_0_higd'>
					<view class='flex flex-wrap align-center rcwtzg_fd1_0_c0_higd'>
						<text>{{$t('巡更时间')}}</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='rcwtzg_fd1_0_c1_c0_higd'>{{info.xgsj}}</text>
					</view>
					<view class='flex flex-wrap align-center rcwtzg_fd1_0_c2_higd'>
						<text class='rcwtzg_fd1_0_c2_c0_higd'>{{$t('待整改')}}</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center rcwtzg_fd1_0_higd'>
					<view class='flex flex-wrap align-center rcwtzg_fd1_0_c0_higd'>
						<text>{{$t('巡更人')}}</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='rcwtzg_fd1_0_c1_c0_higd'>{{info.user_real_name}}</text>
					</view>
				</view>
				<view class='flex align-stretch rcwtzg_fd1_0_higd'>
					<view class='flex align-start rcwtzg_fd1_0_c0_higd'>
						<text>{{$t('问题描述')}}</text>
					</view>
					<view class='flex align-stretch flex-sub'>
						<text class='rcwtzg_fd1_0_c1_c0_higd'>{{info.wtms?info.wtms:'无'}}</text>
					</view>
				</view>
				<template v-if="info.wttp.length!=0">
					<view class='flex flex-wrap align-center'>
						<image v-for='(item,key0) in info.wttp' :key='key0' class='rcwtzg_fd1_3_c0_higd'
							mode="aspectFill" @tap.stop="multiImagePreview(item,info.wttp,'')" :src='item'></image>
					</view>
				</template>

				<template  v-if=" info.wtsp.length!=0">
					<view class='flex flex-wrap align-center' v-for='(item,key0) in info.wtsp' :key='key0'>
						<video  v-if="uptype == 2" class='flex  rcwtzg_fd1_4_c0_higd' :poster="item.thumb" :src="item.path" controls='true'
							x5-video-player-type="h5" :enable-progress-gesture='true' object-fit="fill"></video>
						<view  v-if="uptype ==0" class="rcwtzg_fd1_4_c0_higd" style="position: relative;"  @tap.stop="mixinToPlayVideo(item.path)">
							<image class='flex  rcwtzg_fd1_4_c0_higd' :src="item.thumb" mode="aspectFill"></image>
							<image style="position: absolute;width: 88rpx;height: 88rpx;left: 50%;top: 50%;margin-top: -44rpx;margin-left: -44rpx;z-index:9;"  :src='STATIC_URL+"247.png"' mode=""></image>
						</view>
					</view>
				</template>

			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局2flex布局开始-->
			<view class="flex flex-wrap align-center justify-center benben-flex-layout rcwtzg_flex_2_higd"
				@tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pagercxg/rctjzg/rctjzg?id=${ids}`">
				<button class='rcwtzg_fd2_0_higd'>{{$t('整改')}}</button>
			</view>

			<!---flex布局2flex布局结束-->


		</view>
	</page-body>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
import { SERVER_TYPE } from '@/common/config.js'
	export default {
		components: {},


		data() {
			return {
				/** xgsj【巡更时间】
				 *   wtms【问题描述】
				 *   wtzt【问题状态】
				 *   user_real_name【巡更员】 **/
				"info": {
					"user_real_name": "",
					"wtzt": "",
					"wtms": "",
					"wttp": [],
					"wtsp": [],
					"xgsj": ""
				},
				"id": "2",
				"title": "",
				"ids": "",
				uptype:0,// 服务端类型 0:赛诸葛（现在oss)  1  mock  2:其他（本地上传)
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			let {
				id,
				title,
				ids
			} = options
			if (id !== undefined) this.id = id
			if (title !== undefined) this.title = title
			if (ids !== undefined) this.ids = ids
			this.getyb74a7461a676aFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.uptype=SERVER_TYPE
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//查询日常巡更-待整改问题详情
			async getyb74a7461a676aFunc() {
				//请求方法
				//数据验证

				let datainfo = await this.$api.get(global.apiUrls.post674a7461a676a, {
					aid: this.ids
				});

				if (datainfo.data.code != 1) {
					this.$message.info(datainfo.data.msg);
					return
				}
				let infoinfo = datainfo.data;
				this.info = infoinfo.data

			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;

		.rcwtzg_flex_2_higd {
			position: absolute;
			bottom: 0rpx;
			width: 100%;
			height: 200rpx;

			.rcwtzg_fd2_0_higd {
				border-radius: 44rpx;
				width: 686rpx;
				line-height: 88rpx;
				font-size: 32rpx;
				background: #D32A29;
				color: #fff;
				height: 88rpx;
			}
		}

		.rcwtzg_flex_1_higd {
			margin: 16rpx 0rpx 16rpx 0rpx;
			background: rgba(255, 255, 255, 1);
			background-size: 100% auto;
			padding: 28rpx 32rpx 36rpx 32rpx;

			.rcwtzg_fd1_3_c0_higd {
				width: 156rpx;
				height: 156rpx;
				border-radius: 8rpx;
				margin: 0rpx 16rpx 16rpx 0rpx;
			}

			.rcwtzg_fd1_4_c0_higd {
				width: 100%;
				height: 300rpx;
				border-radius: 10rpx 10rpx 10rpx 10rpx;
			}
		}

		.rcwtzg_fd1_0_higd {
			line-height: 40rpx;
			color: rgba(153, 153, 153, 1);
			font-size: 28rpx;
			margin: 0rpx 0rpx 28rpx 0rpx;

			.rcwtzg_fd1_0_c2_higd {
				margin: 0rpx 0rpx 0rpx auto;
				// height: 40rpx;
				width: 96rpx;
				border-radius: 8rpx;
				border: 2px solid #FD574B;

				.rcwtzg_fd1_0_c2_c0_higd {
					color: rgba(253, 87, 75, 1);
					font-size: 24rpx;
					width: 96rpx;
					text-align: center;
					line-height: 40rpx;
				}
			}
		}

		.rcwtzg_fd1_0_c0_higd {
			width: 144rpx;
		}

		.rcwtzg_fd1_0_c1_c0_higd {
			color: rgba(51, 51, 51, 1);
		}

		.rcwtzg_flex_0_higd {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;

			.rcwtzg_fd0_0_higd {
				padding: 0rpx 32rpx 0rpx 32rpx;

				.rcwtzg_fd0_0_c1_c0_higd {
					font-size: 36rpx;
					font-weight: 700;
					color: #333333;
					line-height: 50rpx;
				}
			}
		}

		.rcwtzg_fd0_0_c0_higd {
			width: 120rpx;

			.rcwtzg_fd0_0_c0_c0_higd {
				font-size: 36rpx;
				color: #333;
			}
		}

		.rcwtzg_fd0_0_c2_c0_higd {
			font-size: 32rpx;
			color: rgba(211, 42, 41, 1);
		}
	}
</style>
